package com.shengyuan.manage_os.old.ying.erpm.tasks;

import com.shengyuan.manage_os.old.ying.boce.http.HttpException;
import com.shengyuan.manage_os.old.ying.boce.task.GenericTask;
import com.shengyuan.manage_os.old.ying.boce.task.TaskParams;
import com.shengyuan.manage_os.old.ying.boce.task.TaskResult;
import com.shengyuan.manage_os.old.ying.erpm.LoginActivity;
import com.shengyuan.manage_os.old.ying.erpm.MainApplication;

public class Submit_System_Push_Data_Task extends GenericTask {
	public static final String DATA="DATA";
	public String mErrorMessage;
	@Override
	protected TaskResult _doInBackground(TaskParams... params) {
		try {
			TaskParams param= params[0];
			String TypeName = LoginActivity.pmUser.UserName;
			String TypeCode = param.getString( DATA);
			MainApplication.mApiErpm.Service_Get_ApplicationData( TypeName, TypeCode, "pushuser_login");
			return TaskResult.OK;
		}catch (HttpException e) {
  			mErrorMessage = "网络超时异常";
			return TaskResult.FAILED;
		}
		catch (Exception e) {
			e.printStackTrace();
			mErrorMessage = e.getMessage();
			return TaskResult.FAILED;
		}
	}
}    